<?php

/**
 * 交易模型，可以生成对应的模型单号
 */
class TransModel extends CommonModel {

    protected $_auto = array(
        array('create_time','intime',1,'callback'),
        array('mano','getNO',1,'callback'), //单号
        array('update_time','time',2,'function'),
    );

    public function getNO(){
        return $this->genManNo($this->getModelName());
    }

    public function intime($strtime){
    	return empty($strtime)?0:strtotime($strtime);
    }

    public  function getCheckBoxValue($field){
        return $value = $field =='on'?1:0;
    }
}
?>
